Skinning the management dialog
------------------------------

1. List of controls

To customize the look of the dialog displayed to allow the user to customize shortcuts, your skin needs to provide 'script-skinsettings.xml'. It supports the following controls:

Primary controls:

ID	Type	Label	Description
101	Label			Current type of shortcut being viewed
102	Button			Change type of shortcut being viewed (down)
103	Button			Change type of shortcut being viewed (up)
111	List			Available shortcuts for the current type being viewed
211	List			Shortcuts the user has chosen for the [groupname]
301	Button	32000	Add a new shortcut
302	Button	32001	Delete shortcut
303	Button	32002	Move shortcut up
304	Button	32003	Move shortcut down
305	Button	32025	Change shortcut label (if control 402 is not included)
306	Button	32026	Browse for thumbnail
307	Button	32027	Change shortcut action (if control 403 is not included)
308	Button	32028	Reset shortcuts

309 Button  32044	Change widget (See "Advanced Usage")
310 Button  32045	Change background (See "Advanced Usage")
311 Button          Select skin-provided thumbnail (See "Advanced Usage")

401 Button	32048	Alternative method to set a shortcut
404 Button			Set a custom property
405 Button			Launch management dialog for submenu / additional menus
406 Button			Launch management dialog for additional menu 1
407 Button			Launch management dialog for additional menu 2
408 Button			Launch management dialog for additional menu 3
409 Button			Launch management dialog for additional menu 4
410 Button			Launch management dialog for additional menu 5


500 Label   32071 / 32072	Window Title

It is recommended you set the label for all of these controls with the exception of 500, however if no label is provided the script will fill the label (except 404/405). A button's label2 will NOT work if the script fills the label.

If you do not want the script to fill the labels for these controls, you can specify &nolabels=true when invoking the management dialog.

In the case of label 500, if this control is present the script will always fill its label with either "Customize Main Menu" or "Customize Submenu" (or localised equivalents).

Most of these controls are optional (though it is recommended to include them), but you MUST include control 211. Controls 101, 102, 103 and 111 all rely on the others being present.


2. List of window properties

Property name			Description
customProperty			Custom property name - detailed description in section 5
customValue				Custom property value - detailed description in section 5
level					Level of submenu - detailed description in section 6
overrideName			Override for window title when editing submenu
useWidgetNameAsLabel	Define if widget name is used for shortcut label too - detailed description in section 9


3. Using label2 on buttons to provide more information

You can set the label2 value of buttons to provide details of current selected - for example, the current label or action of the user selected shortcut.

User-selected shortcuts have the same properties they will have when displayed in a menu, with the addition of "path" which shows the current selected action in a displayable format.

NOTE: You MUST provide a label (even one set to a script-provided string) for label2's to operate.


4. Alternative method to set a shortcut

Rather than using list 111 to let the user select a shortcut, you can include button 401. When clicked it will show the user, via the standard Select dialog, first a list of the available categories of shortcuts, then the shortcuts within that category.


5. Set a custom property

If you want to attach a custom property to a menu item, you can include button 404.

To manually set a property, first set the following window properties

	customProperty	The name you are giving to the custom property
	customValue		The value of the custom property (to clear a property, don't set this property)
	
Then send a click to control 404. The two properties will be cleared afterwards.

You can set defaults for your custom property in your overrides.xml file. See resources/Advanced Usage.txt - "Overrides.xml".

To let Skin Shortcuts show a dialog to let the user select from options you have defined in your Overrides.xml, set the following window property

	chooseProperty	The property that you want the user to set
	
Then send a click to control 404. The property will be cleared afterwards.


6. Launch management dialog for submenu / additional menus

You can give the users a way to launch the management dialog for the submenu or an additional menu from the management dialog.

To do this include the control 405. Clicking it will launch the management dialog for the submenu of the selected item.

To launch the management dialog for an additional sub menu, first set the window property "level", then send a click to 405. The property will be cleared afterwards.
Or include controls 406, 407, 408, 409 or 410. These will launch the management dialog for levels 1 through 5 respectively.

You will likely only want to include this when editing the main menu. You can check the window property "groupname" for the value "mainmenu" to only display it when relevant.

When an additional management dialog is launched, the window property "additionalDialog" will be set. This can be used, for example, to manage visibility of the original dialog.

	<visible>!IsEmpty(Window.Property(additionalDialog))</visible>


7. Limit controls to main menu only

You may wish to only show some of these controls when the user is editing the main menu only, not a submenu. To do this, check the window property "groupname" for the value "mainmenu".


8. Shortcut Categories

The available shortcuts are grouped into several categories within the management dialog. If you wish to customise these categories, copy the format in %script.skinshortcuts%/resources/overrides.xml


9. Filling shortcut label with widget name

In some use-cases it can be useful to fill shortcut label with widget name when widget is selected (button 309). It can be edited by user (unlike of widget name) and then later shown in skin.
To do this set window property "useWidgetNameAsLabel" to "true" before button 309 action is done.
